import web.settings
from common.helper import init_log
from web.app import app, init_app


def main(debug=False):
    init_log()
    init_app(es=True, scheduler=True)
    app.run(host='0.0.0.0', port=web.settings.PORT, debug=debug)


if __name__ == '__main__':
    main()
